package com.wzdigit.wms.basic.mapper.core.inventory;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.client.request.report.LotInvReportSearchRequest;
import com.wzdigit.wms.basic.client.response.report.*;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 整机仓位库存报表Mapper Created by zyf on 2021/4/22 16:37
 */
@MyBatisRepository
public interface LotInvReportMapper extends BaseMapper<LotInvReportReponse> {
    //查询部分信息
	List<LotInvReportReponse> selectAll(@Param("dto") LotInvReportSearchRequest dto);
	//根据so+soItem查询批次号
    List<String> selectLotno(@Param("so") String so,@Param("soItem")  String soItem);
    //查询库存数量
    BigDecimal selectQty(@Param("dto") LotInvReportReponse dto,@Param("lotnos") List<String> lotnos);
    //查询物料信息
    LotInvSkuInfo selectSkuInfo(@Param("skuId") BigDecimal skuId);
    //查询订单信息
    LotIInvSaleInfo selectSaleInfo(@Param("so") String so);
    //查询库龄
    Date selectInvDate(@Param("so") String so, @Param("soItem")  String soItem);

    //分组查询销售+批次信息
    List<SoGroupInfo> selectSoGroup();
    //分组查询库存信息
    List<InvGroupInfo> selectInvGroup();
    //分组查询入库日期信息
    List<DateGroupInfo> selectDateGroup();


    //查询整机仓位报表【新】
    List<LotInvReportReponse> selectAllNew(@Param("dto") LotInvReportSearchRequest dto);

   }
